import axios from "../utils/request.js";


//注册用户
export function RegisterJS(data){
        return axios({
            method:"post",
            url:"User/UserRegister",
            data:data
        })
}
//用户登录
export function LoginJS(data) {
    return axios({
        method: "post",
        url: "User/GetUserLogin",
        data: data
    });
}
//用户列表
export function UserInfo(data){
    return axios({
        method:"get",
        url:"User/GetUserInfo",
        params:{
            userName:data.userName,
            fullName:data.fullName,
            pageIndex:data.pageIndex,
            pageSize:data.pageSize,
        },
    })
}
//用户删除
export function UserDelJS(data){
    console.log(data);   
    return axios({
        method:"delete",
        url:"User/DeleteUser?id="+data,
    })
}
//批量删除用户
export function UserBatchDel(data){
    console.log(data);   
    return axios({
        method:"delete",
        url:"User/BatchDelUser",
        data:data,
    })
}
//反显(加载)用户信息
export function EditUserById(data){
    return axios({
        method:"get",
        url:"User/UserQueryById?id="+data,
    })
}
//修改用户
export function EditUser(data){
    return axios({
        method:"put",
        url:"User/UpdateUser",
        data:data
    })
}